<?php

function _seo_image($content, $title){
  $title = addslashes($title);
  
  preg_match_all('/<img(.*?)>/', $content, $matches);
  
  if(count($matches[1])){
    foreach($matches[1] as $count => $match){
      str_replace($match, $match.' title="'.$title.'"'.' alt="'.$title.'"', $content);
    }
  }
  
  return $content;
}